* {
    margin: 0;
    padding: 0;
    /* 禁止鼠标选中元素 */
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;
    background-color: #fff;
}

#stage {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: url(./imgs/bg.jpg) no-repeat;
    background-size: 100% 100%;
}

#game {
    width: 100%;
    height: 100%;
    position: absolute;
}

#ui {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 10;
}

/* 分数的样式 */
#ui .score-ui {
    width: 120px;
    height: 40px;
    margin-left: 20px;
    line-height: 40px;
    border-bottom: 2px solid #40c061;
    padding: 5px;
}

#ui .score-ui img {
    width: 40px;
    height: 40px;
}

#ui .score-ui span {
    color: #fff;
    font-size: 30px;
    position: absolute;
    left: 80px;
}

#ui #start-alert {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 30;
}

#start-alert .game-desc {
    width: 80%;
    margin: 100px auto;
    text-align: center;
}

#start-alert .game-desc .logo {
    width: 300px;
}
#start-alert .game-desc p {
    width: 300px;
    margin: 0 auto;
    font-size: 16px;
    font-weight: 300;
    line-height: 30px;
    color: #fff;
    margin-top: 20px;
}

#start-alert footer {
    text-align: center;
    color: #fff;
}
#start-btn {
    font-size: 36px;
    text-shadow: 
        0 0 1px #fff,
        0 0 2px #fff, 
        0 0 4px #b6ff00, 
        0 0 7px #b6ff00, 
        0 0 10px #b6ff00, 
        0 0 15px #b6ff00;
}

#start-alert footer p {
    margin-top: 100px;
    color: #aaa;
    font-size: 12px;
}

#start-alert footer p::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    margin-left: -20px;
    background: url(./imgs/virus.png) no-repeat;
    background-size: 100% 100%;
    opacity: .7;
}

/* 游戏结束样式 */
#game-over-alert {
    width: 240px;
    height: 80px;
    border: 1px solid rgb(85, 255,227);
    border-radius: 10px;
    color: #fff;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -120px;
    margin-top: -100px;
    z-index: 30;
    display: none;
    background-color: rgba(0, 0, 0, .3);
}

#game-over-alert h1 {
    width: 150px;
    margin: 0 auto;
    margin-top: -40px;
    text-shadow: 0 0 15px rgb(85, 255, 227);
}

#game-over-alert #restart-btn {
    font-size: 24px;
    margin-top: 20px;
}




/* 滑动动画 */
.slide-up {
    transform: translateY(-400px);
    transition: transform .4s ease-in-out;
}
.slide-down {
    transform: translateY(400px);
    transition: transform .4s ease-in-out;
}

/* 病毒样式 */
.virus {
    width: 80px;
    height: 80px;
    position: absolute;
    left: 100px;
    top: 0px;
    background: url(./imgs/virus.png) no-repeat;
    background-size: 100% 100%;
}

.virus .letter {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: radial-gradient(rgba(255, 150, 150, 0), rgba(255, 0 ,0 ,1 ));
    text-align: center;
    color: #fff;
    line-height: 60px;
    border-radius: 60px;
    font-size: 28px;
    font-weight: 800;
    left: 10px;
    top: 10px;
    box-shadow: 0 0 15px #f00;
}

/* 警告动画 */
.warning {
    width: 100%;
    height: 100%;
    position: absolute;
    background-image: linear-gradient(to right,rgba(255, 0, 0, .5) 0%,rgba(255, 0, 0, 0) 20%,rgba(0, 0, 0, 0) 80%,rgba(255, 0, 0, .5) 100%);
    z-index: 10;
    animation: color-fade 0.5s 3;
    opacity: 0;
}

/* 警告动画 */
@keyframes color-fade {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

/* 病毒消失动画 */
.fade-out {
    opacity: 0;
    transition: opacity 1s;
}